package com.minio.demo.config;

import com.minio.demo.utils.MinioUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "minio")
public class MinioConfiguration {

    private String endpoint ;

    private String accessKey ;

    private String secretKey ;

    @Bean
    public MinioUtils minioUtils() {
        return new MinioUtils(endpoint, accessKey, secretKey);
    }
}